package sipus.database.model;

// Generated Apr 16, 2010 2:27:16 PM by Hibernate Tools 3.2.4.CR1

import static javax.persistence.GenerationType.IDENTITY;

import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * Bank generated by hbm2java
 */
@Entity
@Table(schema = "public", name = "log_login")
public class LogLogin implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 2463821577548439808L;
	private Long id;
	private String oleh;public String toString(){return nama;}

	public void setOleh(String oleh) {
		this.oleh = oleh;
	}

	public String getOleh() {
		return oleh;
	}

	private Date tanggal_dirubah = new Date();

	public void setTanggal_dirubah(Date tanggal_dirubah) {
		this.tanggal_dirubah = tanggal_dirubah;
	}

	@Temporal(TemporalType.TIMESTAMP)
	public Date getTanggal_dirubah() {
		return tanggal_dirubah;
	}

	private String nama;
	private String ip;
	private String keterangan;
	private Date login = new Date();
	private Date logout;
	private Tbmuser tbmuser;

	private String hostname;
	private Boolean success_status;
	private String description;

	public LogLogin() {
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", insertable = false, unique = true, nullable = false)
	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@Column(name = "nama", nullable = false, length = 255)
	public String getNama() {
		return this.nama;
	}

	public void setNama(String nama) {
		this.nama = nama;
	}

	@Column(name = "keterangan", nullable = true)
	public String getKeterangan() {
		return this.keterangan;
	}

	public void setKeterangan(String keterangan) {
		this.keterangan = keterangan;
	}

	public void setTbmuser(Tbmuser tbmuser) {
		this.tbmuser = tbmuser;
	}

	@ManyToOne(cascade = { CascadeType.PERSIST, CascadeType.MERGE })
	@JoinColumn(name = "tbmuser", nullable = true)
	public Tbmuser getTbmuser() {
		return tbmuser;
	}

	public void setIp(String ip) {
		this.ip = ip;
	}

	public String getIp() {
		return ip;
	}

	public void setLogout(Date logout) {
		this.logout = logout;
	}

	@Temporal(TemporalType.TIMESTAMP)
	public Date getLogout() {
		return logout;
	}

	public void setLogin(Date login) {
		this.login = login;
	}

	@Temporal(TemporalType.TIMESTAMP)
	public Date getLogin() {
		return login;
	}

	public void setHostname(String hostname) {
		this.hostname = hostname;
	}

	public String getHostname() {
		return hostname;
	}

	public void setSuccess_status(Boolean success_status) {
		this.success_status = success_status;
	}

	public Boolean getSuccess_status() {
		return success_status;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getDescription() {
		return description;
	}

}
